import Vuex from 'vuex'
import Vue from 'vue'

Vue.use(Vuex)
export default new Vuex.Store({
    state: {
        name: '',
        type: ''
    },
    mutations: {
        setName (state, val) {
            console.log(val)
            return state.name = val
        },
        setType (state, val) {
            return state.type = val
        }
    },
    getters: {
        name: (state) => {
            return state.name
        },
        type: (state) => {
            return state.type
        }
    }
})
